package com.fengniu.ejb.dao;

import java.io.Serializable;
import java.util.List;

import com.fengniu.ejb.entity.Category;
import com.fengniu.ejb.entity.Category2Category;

public interface ICategoryDao extends Serializable {

	public Category saveCategory(Category category);

	public void deleteCategoryByCategoryId(String categoryId);

	public Category findCategoryByCategoryId(String categoryId);

	public Category findCategoryBySysId(long categorySysId);

	public List<Category> getListAllCategory();

	public List<Category> getListCategoryPrimaryTrailBy(long categorySysId);

	public List<Category> getListCategoryPrimaryTrailBy(String categoryId);

	/**
	 * Get child categories of category identified by parentCategoryId
	 * 
	 * @param parentCategoryId
	 * @param pgno
	 * @param pgsize
	 * @param orderBy
	 * @return
	 */
	public List<Category> getListChildCategoryBy(String parentCategoryId, int pgno, int pgsize, String orderBy);

	/**
	 * get category2category list
	 * 
	 * @param categoryId
	 * @param relationIds
	 * @param categoryId2
	 * @param statusIds
	 * @param pgno
	 * @param pgsize
	 * @param orderBy
	 * @return
	 */
	public List<Category2Category> getListCategory2CategoryBy(String categoryId, Integer[] relationIds,
			String categoryId2, Integer[] statusIds, String orderBy, int pgno, int pgsize);

	/**
	 * get count of category2category
	 * 
	 * @param categoryId
	 * @param relationIds
	 * @param categoryId2
	 * @param statusIds
	 * @return
	 */
	public long getCountCategory2CategoryBy(String categoryId, Integer[] relationIds, String categoryId2,
			Integer[] statusIds);

	/**
	 * save category2category
	 * 
	 * @param g22g
	 * @return
	 */
	public Category2Category saveCategory2Category(Category2Category g22g);
}
